<template>
  <div class="overtime">
    <Header title="办公室加班申请表">
      <template v-slot:left>
        <span class="iconfont icon-fanhui" @click="$router.go(-1)"></span>
      </template>
    </Header>
    <div class="user">
      <div class="img">
        <img src="/img/1.jpg" alt />
      </div>
      <div class="content">
        <p>
          申请人姓名：
          <span>{{obj.name}}</span>
        </p>
        <p>
          直接主管：
          <span>{{obj.gaoname}}</span>
        </p>
      </div>
    </div>
    <!-- 表单组件 -->
    <From></From>
    <div class="tabbar">
      <div class="left">取消</div>
      <div class="right">提交</div>
    </div>
  </div>
</template>

<script>
import axios from "axios";
import Header from "../../components/Header";
import From from "./From/From";
export default {
  data() {
    return {
      obj: {}
    };
  },
  mounted() {
    //给上面的姓名做的请求
    axios
      .post("/getlist", { id: JSON.parse(localStorage.getItem("id")) })
      .then(res => {
        this.obj = res.data.list;
      });
  },
  methods: {},
  components: {
    Header,
    From
  },
  computed: {}
};
</script>

<style lang='scss' scoped>
.overtime {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #f5f5f5;
  .header {
    background: green;
    color: white;
  }
  .user {
    width: 100%;
    height: 100px;
    background: green;
    border-bottom-left-radius: 25px;
    border-bottom-right-radius: 25px;
    display: flex;
    .img {
      width: 50px;
      height: 50px;
      margin-top: 10px;
      margin-left: 20px;
      margin-right: 20px;
      img {
        width: 100%;
        height: 100%;
        border-radius: 50%;
      }
    }
    .content {
      margin-top: 10px;
      color: white;
      p {
        margin-bottom: 10px;
      }
    }
  }
  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    line-height: 60px;
    display: flex;
    .left{
        width: 50%;
        text-align: center;
        background: white;
    }
    .right{
        width: 50%;
        text-align: center;
        background: rgb(7, 65, 29);
        color: white;
    }
  }
}
</style>